package com.lzh.crypt.exception;

/**
 * @author zhehen.lu
 * @date 2025/8/10 19:05
 */
public enum ErrorCode {
    ERROR_GENERATING_AES_KEY(10000, "生成AES秘钥错误！"),
    ENCRYPTION_ERROR(10001, "AES加密错误！"),
    DECRYPTION_ERROR(10002, "AES解密错误！"),
    RSA_PRIVATE_ERROR(10003, "RSA私钥错误！"),
    RSA_PUBLIC_ERROR(10004, "RSA公钥错误！"),
    RSA_INSTANTIATION_ERROR(10005, "RSA实例化错误！"),
    RSA_VALIDATION_ERROR(10006, "RSA验证错误！"),
    RSA_SIGNATURE_ERROR(10007, "RSA签名错误！"),
    RSA_ENCRYPTION_EXCEPTION(10008, "RSA加密异常！"),
    RSA_DECRYPTION_EXCEPTION(10009, "RSA解密异常！"),
    DATA_TOO_LONG(10010, "RSA数据过长！"),
    ;

    private Integer errorCode;
    private String errorMsg;

    private ErrorCode(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public Integer getErrorCode() {
        return this.errorCode;
    }

    public String getErrorMsg() {
        return this.errorMsg;
    }
}
